﻿<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<HEAD><META content="IE=11.0000"
http-equiv="X-UA-Compatible">
 
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
  <TITLE>注册</TITLE>
  <LINK href="css/style.css" rel="stylesheet" type="text/css">
  <script src="jquery-1.8.3.min.js" type="text/javascript"></script>
  <script type="text/javascript">
    $(function () {

    });
    function check() {
      if(!checkname()){
        $("#na").text("用户名已存在");
        return false;
      }
      if(!checkpwd()){
        $("#sp").text("两次密码不同");
        return true;
      }

      return false;
    }
    function checkname() {
      var username=$("#username");
      $.post("pdName",{"uname":username},function (result) {
        return result;
      });
    }
    function checkpwd() {
      var pwd=$("#pwd").val();
      var repwd=$("#repwd").val();
      if(pwd!=repwd){
        return false;
      }
      return true;
    }
  </script>
<META name="GENERATOR" content="MSHTML 11.00.10586.420"></HEAD> 
<BODY>
<DIV class="wrap" id="header"><IMG src="images/logo.gif"> </DIV>
<DIV class="wrap" id="navbar">
<DIV class="search">
</DIV></DIV>
<DIV class="box" id="register">
<H2>新用户注册</H2>
<DIV class="content">
  <FORM onsubmit="return check()" action="userRegist" method="post">
    <DL>
      <DT>用户名：</DT>
        <DD><INPUT name="username" class="input-text" id="username" type="text"/><span id="na"></span></DD>
      <DT>密码：</DT>
        <DD><INPUT name="password" class="input-text" id="pwd" type="password"/></DD>
      <DT>确认密码：</DT>
        <DD><INPUT name="repassword" class="input-text" id="repwd" type="password"/><span id="sp"></span></DD>
      <DT></DT>
        <DD><INPUT name="submit" class="input-button" type="submit" value=""/></DD>
    </DL>
  </FORM>
<DIV class="error"></DIV>
<DIV class="error"></DIV></DIV></DIV>
<DIV class="wrap" id="footer">北大青鸟 © 版权所有 </DIV></BODY></HTML>
